generate CC10_413d_REP = 1 if CC413d ==2
replace CC10_413d_REP = 0 if CC413d ==1
generate Obamadisapproval = CC308a if CC308a <5
generate Legdisapproval = CC308e if CC308e <5
generate RepPartyLowChamBelief = 0
replace RepPartyLowChamBelief = 1 if CC309d == 1
generate DemPartyLowChamBelief = 0
replace DemPartyLowChamBelief = 1 if CC309d == 2

// Obama Only
logit CC10_413d_REP i.Obamadisapproval

// Legislature Only
logit CC10_413d_REP c.Legdisapproval##i.RepPartyLowChamBelief

logit CC10_413d_REP i.Legdisapproval##i.RepPartyLowChamBelief



// with Obama disapproval
logit CC10_413d_REP i.V208 i.V211 i.V213 i.Obamadisapproval c.Legdisapproval##i.RepPartyLowChamBelief i.CC334A i.V243 i.V242 i.V265 i.CC302 i.CC421a

// without Obama disapproval
logit CC10_413d_REP  i.educ i.race i.region c.Legdisapproval##i.RepPartyLowChamBelief i.child18 i.unionhh i.CC334A i.CC302 i.pid7

//Race and vote crosstab
tabulate CC10_413d_REP V211 [aweight = V101], column



// obama support and turnout
generate Voted = 0 if V403 ==1 
replace Voted = 1 if CC401 == 5
tabulate Voted

logit Voted i.Obamadisapproval
